﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Site1.Master" AutoEventWireup="true" CodeBehind="DetalleXTorneo.aspx.cs" Inherits="BoxScore.jugador.DetalleXTorneo" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register src="_jugador.ascx" tagname="_jugador" tagprefix="uc1" %>
<%@ Register src="../juego/_infoJuego.ascx" tagname="_infoJuego" tagprefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="lateral1" runat="server">
    <img src="../css/images/Ballpark_7.png" />

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="lateral2" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="lateral3" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="contenido" runat="server">


    <uc1:_jugador ID="_jugador1" runat="server" />
    <br />
    
<h2 class="title">Estadisticas por Juego</h2>
    
    <asp:UpdatePanel runat="server">
    <ContentTemplate>

        <asp:TabContainer ID="TabContainer1" runat="server">
            <asp:TabPanel runat="server" ID="estofensivas">
                <HeaderTemplate>
                    Estadisticas Ofensivas
                </HeaderTemplate>
                <ContentTemplate>
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                                DataSourceID="ObjectDataSource1">
                                <Columns>
                                    <asp:TemplateField HeaderText="Fecha">
                                        <ItemTemplate>
                                            <asp:HiddenField ID="HiddenField1" runat="server" 
                                                Value='<%# Eval("id_game", "{0}") %>' />
                                            <uc2:_infoJuego ID="_infoJuego1" runat="server" />
                                            <br />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="ab" HeaderText="AB" SortExpression="ab" />
                                    <asp:BoundField DataField="h" HeaderText="H" SortExpression="h" />
                                    <asp:BoundField DataField="h2" HeaderText="2H" SortExpression="h2" />
                                    <asp:BoundField DataField="h3" HeaderText="3H" SortExpression="h3" />
                                    <asp:BoundField DataField="hr" HeaderText="HR" SortExpression="hr" />
                                    <asp:BoundField DataField="rbi" HeaderText="RBI" SortExpression="rbi" />
                                    <asp:BoundField DataField="run" HeaderText="R" SortExpression="run" />
                                    <asp:BoundField DataField="bb" HeaderText="BB" SortExpression="bb" />
                                    <%--<asp:BoundField DataField="ibb" HeaderText="IBB" SortExpression="ibb" />--%>
                                    <asp:BoundField DataField="so" HeaderText="SO" SortExpression="so" />
                                    <asp:BoundField DataField="sb" HeaderText="SB" SortExpression="sb" />
                                    <asp:BoundField DataField="average" HeaderText="AVG" 
                                        SortExpression="average" DataFormatString= ".{0:F0}" />
                                    <asp:BoundField DataField="slugging" HeaderText="SLG" DataFormatString="{0:F3}" 
                                        SortExpression="slugging" />
                                </Columns>
                                <EmptyDataTemplate>
                                    No hay informacion cargada para este Jugador
                                </EmptyDataTemplate>
                            </asp:GridView>

                            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                                SelectMethod="getOffensivaStaticsByTournament" 
                                TypeName="BoxScore.Model.BoxScoreBD">
                                <SelectParameters>
                                    <asp:QueryStringParameter Name="idtournament" QueryStringField="torneo" 
                                        Type="Int32" />
                                    <asp:QueryStringParameter Name="idplayer" QueryStringField="jugador" 
                                        Type="Int32" />
                                </SelectParameters>
                            </asp:ObjectDataSource>

                </ContentTemplate>
            </asp:TabPanel>
            <asp:TabPanel runat="server" ID="TabPanel1">
                <HeaderTemplate>
                    Estadisticas Defensivas
                </HeaderTemplate>
                <ContentTemplate>
                    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                        DataSourceID="ObjectDataSource3">
                        <Columns>
                            <asp:TemplateField HeaderText="Fecha">
                                <ItemTemplate>
                                    <asp:HiddenField ID="HiddenField1" runat="server" 
                                        Value='<%# Eval("g", "{0}") %>' />
                                    <uc2:_infoJuego ID="_infoJuego2" runat="server" />
                                    <br />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="positionString" HeaderText="POS" 
                                SortExpression="positionString" />
                            <asp:BoundField DataField="ip" HeaderText="INN" SortExpression="ip" />
                            <asp:BoundField DataField="outs" HeaderText="O" SortExpression="outs" />
                            <asp:BoundField DataField="a" HeaderText="A" SortExpression="a" />
                            <asp:BoundField DataField="e" HeaderText="E" SortExpression="e" />
                            <asp:BoundField DataField="dp" HeaderText="DP" SortExpression="dp" />
                            <asp:BoundField DataField="pb" HeaderText="PB" SortExpression="pb" />
                        </Columns>
                        <EmptyDataTemplate>
                            No hay datos cargados para este jugador
                        </EmptyDataTemplate>
                    </asp:GridView>


                    <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" 
                        SelectMethod="getDefensiveStaticsByTournament" 
                        TypeName="BoxScore.Model.BoxScoreBD">
                        <SelectParameters>
                            <asp:QueryStringParameter Name="idtournament" QueryStringField="torneo" 
                                Type="Int32" />
                            <asp:QueryStringParameter Name="idplayer" QueryStringField="jugador" 
                                Type="Int32" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                
                </ContentTemplate>
            </asp:TabPanel>
            <asp:TabPanel runat="server" ID="TabPanel2">
                <HeaderTemplate>
                    Estadisticas Pitcheo
                </HeaderTemplate>
                <ContentTemplate>
                    <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
                        DataSourceID="ObjectDataSource5">
                        <Columns>
                            <asp:TemplateField HeaderText="FECHA">
                                <ItemTemplate>
                                    <asp:HiddenField ID="HiddenField1" runat="server" 
                                        Value='<%# Eval("id_game", "{0}") %>' />
                                    <uc2:_infoJuego ID="_infoJuego3" runat="server" />
                                    <br />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="positionString" HeaderText="POS" 
                                SortExpression="positionString" />
                            <%--<asp:BoundField DataField="nombre" HeaderText="RESULTADO" 
                                SortExpression="nombre" />--%>
                            <asp:BoundField DataField="average" HeaderText="ERA" 
                                SortExpression="average" DataFormatString="{0:f3}" />
                            <asp:BoundField DataField="cg" HeaderText="CG" SortExpression="cg" />
                            <asp:BoundField DataField="ip" HeaderText="INN" SortExpression="ip" DataFormatString="{0:F3}" />
                            <asp:BoundField DataField="h" HeaderText="H" SortExpression="h" />
                            <asp:BoundField DataField="h2" HeaderText="2H" SortExpression="h2" />
                            <asp:BoundField DataField="h3" HeaderText="3H" SortExpression="h3" />
                            <asp:BoundField DataField="hr" HeaderText="HR" SortExpression="hr" />
                            <asp:BoundField DataField="run" HeaderText="R" SortExpression="run" />
                            <asp:BoundField DataField="erun" HeaderText="ER" SortExpression="erun" />
                            <asp:BoundField DataField="bb" HeaderText="BB" SortExpression="bb" />
                            <%--<asp:BoundField DataField="ibb" HeaderText="IBB" SortExpression="ibb" />--%>
                            <asp:BoundField DataField="so" HeaderText="SO" SortExpression="so" />
                        </Columns>
                        <EmptyDataTemplate>
                            NO HAY INFORMACION CARGADA PARA ESTE JUGADOR
                        </EmptyDataTemplate>
                    </asp:GridView>

                    <asp:ObjectDataSource ID="ObjectDataSource5" runat="server" 
                        SelectMethod="getPitchingStaticsByTournament" 
                        TypeName="BoxScore.Model.BoxScoreBD">
                        <SelectParameters>
                            <asp:QueryStringParameter Name="idtournament" QueryStringField="torneo" 
                                Type="Int32" />
                            <asp:QueryStringParameter Name="idplayer" QueryStringField="jugador" 
                                Type="Int32" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                
                </ContentTemplate>
            </asp:TabPanel>
            
            
    
        </asp:TabContainer>    

    
    </ContentTemplate>
    
    
    </asp:UpdatePanel>
    
    




</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="resultados" runat="server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="proximos" runat="server">
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="publicidadAjena" runat="server">
</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="publicidad" runat="server">
</asp:Content>
